Repository navigation
[0-size Tensor No.203] Add 0-size Tensor support for paddle.nn.functional.multi_margin_loss - #341
Merged
Merged
Conversation
Collaborator
|
@co63oc numpy error 代表配置初始化时失败。这五个看上去也是错误配置,直接删去即可~ |
Contributor
Author
|
已修改删除 @cangtianhuang |
Collaborator
|
帮忙把这里面的也一齐删掉吧!这些配置应该都是无效的 |
Contributor
Author
已删除 |
Collaborator
该配置在 apitest 中能够正常拦截,但是直接运行会抛出 cuda700 错误: 这是对用户不友好的行为,co 师傅可以尝试向 paddle 库中提出 issue,或者直接提交 pr 尝试修复一下😉~ |
Contributor
Author
|
Collaborator
|
是的,这个问题可以记录一下,那这个 pr 可以先合入,因为 torch 也不支持 0size: import torch
# paddle.nn.functional.multi_margin_loss(Tensor([5, 0],"float64"), Tensor([5],"int64"), p=1, margin=1.0, weight=None, reduction="mean", name=None, )
input = torch.zeros([5, 0], dtype=torch.float64)
target = torch.ones([5], dtype=torch.int64)
result = torch.nn.functional.multi_margin_loss(input, target, p=1, margin=1.0, weight=None, reduction="mean")
print(result) |
Contributor
Author
好的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





paddle.nn.functional.multi_margin_loss 测试都为numpy error,是否迁移配置到其他文件

配置 report/0size_tensor_gpu/error_config.txt
report/0size_tensor_cpu/error_config.txt